IHG.JSONRequest= function(url, callback)
{
	var name = '__IHGCallback' + (new Date()).getTime();
	url += ((url.indexOf('?') == -1 ? '?callback=' : '&callback=') + name);
	
	if(typeof GM_xmlhttpRequest != 'undefined') {
		GM_xmlhttpRequest({
			method: 'GET',
			url: url,
			headers: {
				'Accept': 'text/javascript'
			},
			onload: function(details) {
				try {
					window[name] = callback;
					eval(details.responseText);
					delete window[name];
				} catch(e) {}
			}
		});
	} else {
		var scriptNode = document.createElement('script');
		scriptNode.setAttribute('src', url);
		scriptNode.setAttribute('type', 'text/javascript');
		
		window[name] = function(data) {
			callback(data);
			scriptNode.parentNode.removeChild(scriptNode);
			delete window[name];
		}
		
		document.getElementsByTagName('head').item(0).appendChild(scriptNode);
	}
}